<div class="products form">
<?php echo $this->ExtendedForm->create('Product', array('novalidate' => 'novalidate'));?>
	<h3><?php echo __d('admin', 'Add Product'); ?></h3>
    <div class="form-group row">
        <div class="col-sm-2">
            <label for="language">Language</label>
            <select name="language" id="language" class="form-control">
                <option value="vietnam">VietNam</option>
                <option value="english">English</option>
                <option value="japan">Japan</option>
            </select>
        </div>
    </div>
	<input type="hidden" name="data[Product][product_category_id]" value="5">
	<div class="form-group row">
		<div class="col-sm-4">
			<label for="ProductDetailVelocity">Code</label>
			<input type="text" required="required" id="ProductCode" maxlength="50" class="form-control" name="data[Product][code]" value="<?php echo @$this->data['Product']['code']?>">
		</div>
		<div class="col-sm-4">
			<label for="ProductDetailLength">Length</label>
			<input id="ProductDetailLength" class="form-control" type="text" required="required" maxlength="50" name="data[ProductDetail][length]" value="<?php echo @$this->data['ProductDetail']['length']?>">
		</div>
	</div>
	<div class="form-group row">
		<div class="col-sm-4">
			<label for="ProductDetailWidth">Width</label>
			<input id="ProductDetailWidth" class="form-control" type="text" required="required" maxlength="50" name="data[ProductDetail][width]" value="<?php echo @$this->data['ProductDetail']['width']?>">
		</div>
		<div class="col-sm-4">
			<label for="ProductDetailHeight">Height</label>
			<input id="ProductDetailHeight" class="form-control" type="text" required="required" maxlength="50" name="data[ProductDetail][height]" value="<?php echo @$this->data['ProductDetail']['height']?>">
		</div>
	</div>
	<!--
	<div class="form-group row">
		<div class="col-sm-4">
			<label for="ProductDetailVelocity">Velocity</label>
			<input id="ProductDetailVelocity" class="form-control" type="text" required="required" maxlength="50" name="data[ProductDetail][velocity]" value="<?php echo @$this->data['ProductDetail']['velocity']?>">
		</div>
		<div class="col-sm-4">
			<label for="ProductDetailLoad">Load</label>
			<input id="ProductDetailLoad" class="form-control" type="text" required="required" maxlength="50" name="data[ProductDetail][load]" value="<?php echo @$this->data['ProductDetail']['load']?>">
		</div>
	</div>
	-->
	<?php
		if(isset($this->request->params['named']['image'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('image', array_merge(array('type' => 'image', 'label' => __d('admin', 'Image'))));
		if(isset($this->request->params['named']['image'])) echo '</div>';
    ?>
    <div class="area-language" id="text-vietnam">
    <?php
        if(isset($this->request->params['named']['name'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('name', array_merge(array('label' => __d('admin', 'Name'))));
		if(isset($this->request->params['named']['name'])) echo '</div>';

		if(isset($this->request->params['named']['short_des'])) echo '<div style="display: none;">';
		echo $this->Form->input('Product.short_des', array_merge(array('value'=>'empty', 'type' => 'textarea','label' => __d('admin', 'Short Des'), 'class' => 'form-control', 'div' => 'form-group row', 'before' => '<div class="col-sm-10">', 'after' => '</div>')));
		if(isset($this->request->params['named']['short_des'])) echo '</div>';

		if(isset($this->request->params['named']['general'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('general', array_merge(array('label' => __d('admin', 'General'))));
		if(isset($this->request->params['named']['general'])) echo '</div>';
    ?>
    </div>
    <div class="area-language" id="text-english" style="display:none">
    <?php 
        if(isset($this->request->params['named']['name_eng'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('name_eng', array_merge(array('label' => __d('admin', 'Name Eng'))));
		if(isset($this->request->params['named']['name_eng'])) echo '</div>';

		if(isset($this->request->params['named']['short_des_eng'])) echo '<div style="display: none;">';
		echo $this->Form->input('Product.short_des_eng', array_merge(array('type' => 'textarea','label' => __d('admin', 'Short Des Eng'), 'class' => 'form-control', 'div' => 'form-group row', 'before' => '<div class="col-sm-10">', 'after' => '</div>')));
		if(isset($this->request->params['named']['short_des_eng'])) echo '</div>';

		if(isset($this->request->params['named']['general_eng'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('general_eng', array_merge(array('label' => __d('admin', 'General Eng'), 'before' => '<div class="col-sm-10">', 'after' => '</div>')));
		if(isset($this->request->params['named']['general_eng'])) echo '</div>';
    ?>
    </div>
    <div class="area-language" id="text-japan" style="display:none">
    <?php
        if(isset($this->request->params['named']['name_jpn'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('name_jpn', array_merge(array('label' => __d('admin', 'Name Jpn'))));
		if(isset($this->request->params['named']['name_jpn'])) echo '</div>';

		if(isset($this->request->params['named']['short_des_jpn'])) echo '<div style="display: none;">';
		echo $this->Form->input('Product.short_des_jpn', array_merge(array('type' => 'textarea','label' => __d('admin', 'Short Des Jpn'), 'class' => 'form-control', 'div' => 'form-group row', 'before' => '<div class="col-sm-10">', 'after' => '</div>')));
		if(isset($this->request->params['named']['short_des_jpn'])) echo '</div>';

		if(isset($this->request->params['named']['general_jpn'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('general_jpn', array_merge(array('label' => __d('admin', 'General Jpn'), 'before' => '<div class="col-sm-10">', 'after' => '</div>')));
		if(isset($this->request->params['named']['general_jpn'])) echo '</div>';
	?>
    </div>
<?php echo $this->ExtendedForm->end(array('label' => __d('admin', 'Save Product'), 'class' => 'btn btn-primary', 'div' => false, 'before' => '<div class="form-group">', 'after' => "\n" . $this->Html->link(__d('admin', 'Cancel'), $redirectUrl, array('class' => 'btn btn-default')) . '</div>'));?>
</div>